<table class="all_staff">
<?php
$br=0;
foreach($staff as $sta){
	$br++;
	if($br==1)echo "<tr>";
	?>
<td>
<a href='<?= site_url('staff/profile/'.$sta->idStaffPk) ?>'><img class="staff_img_small"
	src="<?= base_url('uploads/images/staff/'.$sta->image) ?>" /> <br /> <span
	style="font-size: 10px;"> <?php 
	$name = $sta->name." ".$sta->surname;
	if($this->session->userdata('ln') == 'mk') $name=$sta->title." ".$name;
	else $name.=$sta->title;

	echo $name;
	?>
</span></a>
</td>
<?php 
	if($br==5) {
		echo "</tr>";
		$br=0;
	}
}
?>
</table>
<?php 
echo $pageLinks;
?>